const {http} = require("../../utils/util")
Page({
  data:{
    hotCities:[],
    cities:[]
  },
  onLoad:function(){
    http("http://47.108.197.28:8000/city").then(res=>this.handleHttpData(res));
  },
  handleHttpData(res){
    var hotCities = [];
    res.data.data.hotCities.forEach(item=>{
      hotCities.push(item);
    })
    this.setData({hotCities,cities:res.data.data.cities});
  },
})
